<?php
/**
 * 区域表单字段
 */

namespace App\Console\AdminFormFillByFormId\FieldMakers;



class AppProjectFormFieldMaker extends BaseFormFieldMaker {
    const FORM_ID         = 2;
    const FORM_TITLE      = '小程序/公众号项目表';
    const FORM_TABLE_NAME = 'app_project';

    protected function _getFormData() {
        $this->formId = self::FORM_ID;

        return [
            'id'                   => self::FORM_ID,
            'title'                => self::FORM_TITLE,
            'table_name'           => self::FORM_TABLE_NAME,
            self::FIELD_KEY        => [
                [
                    'title'       => '编号',
                    'field_name'  => 'id',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                    ],
                    'validate'    => '[]',
                    'order'       => 1,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'       => '名称',
                    'field_name'  => 'name',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 1,
                        'display_create' => 1,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 0,
                        'default_value'  => ''
                    ],
                    'validate'    => [
                        'required' => 'true',
                        'message'  => '请填写名称',
                    ],
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'       => '类型',
                    'field_name'  => 'app_project_type_name',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 1,
                        'display_create' => 1,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 0,
                        'default_value'  => ''
                    ],
                    'validate'    => [
                        'required' => 'true',
                        'message'  => '请填写类型',
                    ],
                    'order'       => 2,
                    'display'     => 0,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'       => '模板',
                    'field_name'  => 'mini_program_template_name',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 1,
                        'display_create' => 1,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 0,
                        'default_value'  => ''
                    ],
                    'validate'    => [
                        'required' => 'true',
                        'message'  => '请填写类型',
                    ],
                    'order'       => 2,
                    'display'     => 0,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'       => '项目类型id',
                    'field_name'  => 'app_project_type_id',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                        'default_value'  => ''
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 0,
                    'searchable'  => 0,
                    'show_column' => 0,
                ],
                [
                    'title'       => '本地微信模板信息表id',
                    'field_name'  => 'mpt_id',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                        'default_value'  => ''
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 0,
                    'searchable'  => 0,
                    'show_column' => 0,
                ],
                [
                    'title'       => '项目图标',
                    'field_name'  => 'head_img',
                    'field_type'  => 'uploadImageOne',
                    'props'       => [
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'action'         => '/api/admin/upload-img-ali-oss?imgUrlProName=imgUrl',
                        'maxLength'      => 1,
                        'multiple'       => false,
                        'showUploadList' => false,
                        'max'            => 0,
                        'type'           => 'select',
                        'uploadType'     => 'image',
                        'name'           => 'img',
                        'default_value'  => '',
                    ],
                    'validate'    => '[]',
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'       => '微信logo头像',
                    'field_name'  => 'wx_head_img',
                    'field_type'  => 'uploadImageOne',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 0,
                        'sortable'       => 0,
                        'action'         => '',
                        'maxLength'      => 1,
                        'multiple'       => false,
                        'showUploadList' => false,
                        'max'            => 0,
                        'type'           => 'select',
                        'uploadType'     => 'image',
                        'name'           => 'img',
                        'default_value'  => '',
                    ],
                    'validate'    => [],
                    'order'       => 3,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'       => '微信二维码图片的 URL',
                    'field_name'  => 'wx_qrcode_url',
                    'field_type'  => 'uploadImageOne',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'action'         => '',
                        'maxLength'      => 1,
                        'multiple'       => false,
                        'showUploadList' => false,
                        'max'            => 0,
                        'type'           => 'select',
                        'uploadType'     => 'image',
                        'name'           => 'img',
                        'default_value'  => '',
                    ],
                    'validate'    => [],
                    'order'       => 8,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'          => '程序类型',
                    'field_name'     => 'type',
                    'field_type'     => 'select',
                    'props'          => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 0,
                        'default_value'  => '1'
                    ],
                    'validate'       => [],
                    'order'          => 2,
                    'display'        => 1,
                    'searchable'     => 0,
                    'show_column'    => 1,
                    self::OPTION_KEY => [
                        [
                            'title' => '小程序',
                            'value' => 1,
                            'order' => 1,
                        ],
                        [
                            'title' => '公众号',
                            'value' => 2,
                            'order' => 1,
                        ]
                    ]
                ],
                [
                    'title'       => '备注',
                    'field_name'  => 'remark',
                    'field_type'  => 'textarea',
                    'props'       => [
                        'display_edit'   => 1,
                        'display_create' => 1,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 0,
                        'default_value'  => ''
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'          => '状态',
                    'field_name'     => 'status',
                    'field_type'     => 'select',
                    'props'          => [
                        'display_edit'   => 1,
                        'display_create' => 1,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 0,
                        'default_value'  => '1'
                    ],
                    'validate'       => '[]',
                    'order'          => 2,
                    'display'        => 1,
                    'searchable'     => 0,
                    'show_column'    => 1,
                    self::OPTION_KEY => [
                        [
                            'title' => '启用',
                            'value' => 1,
                            'order' => 1,
                        ],
                        [
                            'title' => '禁用',
                            'value' => 0,
                            'order' => 1,
                        ]
                    ]
                ],
                [
                    'title'          => '审核通过自动发布已通过审核的小程序',
                    'field_name'     => 'switch_audit_success_release',
                    'field_type'     => 'select',
                    'props'          => [
                        'display_edit'   => 1,
                        'display_create' => 1,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 0,
                        'default_value'  => '0'
                    ],
                    'validate'       => '[]',
                    'order'          => 2,
                    'display'        => 1,
                    'searchable'     => 0,
                    'show_column'    => 1,
                    self::OPTION_KEY => [
                        [
                            'title' => '启用',
                            'value' => 1,
                            'order' => 1,
                        ],
                        [
                            'title' => '禁用',
                            'value' => 0,
                            'order' => 1,
                        ]
                    ]
                ],
                [
                    'title'          => '最新一次提审单的审核状态',
                    'field_name'     => 'last_audit_status',
                    'field_type'     => 'select',
                    'props'          => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 0,
                        'default_value'  => '-1'
                    ],
                    'validate'       => '[]',
                    'order'          => 2,
                    'display'        => 1,
                    'searchable'     => 0,
                    'show_column'    => 1,
                    self::OPTION_KEY => [
                        [
                            'title' => '无状态',
                            'value' => -1,
                            'order' => 1,
                        ],
                        [
                            'title' => '审核成功',
                            'value' => 0,
                            'order' => 1,
                        ],
                        [
                            'title' => '审核被拒绝',
                            'value' => 1,
                            'order' => 1,
                        ],
                        [
                            'title' => '审核中',
                            'value' => 2,
                            'order' => 1,
                        ],
                        [
                            'title' => '已撤回',
                            'value' => 3,
                            'order' => 1,
                        ],
                        [
                            'title' => '审核延后',
                            'value' => 4,
                            'order' => 1,
                        ],
                    ]
                ],
                [
                    'title'       => '小程序的设置服务器域名',
                    'field_name'  => 'server_domain',
                    'field_type'  => 'textarea',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 0,
                ],
                [
                    'title'       => '小程序的设置业务域名',
                    'field_name'  => 'setwebviewdomain',
                    'field_type'  => 'textarea',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 0,
                ],
                [
                    'title'       => '审核项列表',
                    'field_name'  => 'wx_submit_audit_item_list',
                    'field_type'  => 'textarea',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 0,
                ],
                [
                    'title'          => '提交审核是否使用模板审核项列表',
                    'field_name'     => 'wx_submit_audit_item_rely_mpt',
                    'field_type'     => 'select',
                    'props'          => [
                        'display_edit'   => 1,
                        'display_create' => 0,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 0,
                        'default_value'  => '1'
                    ],
                    'validate'       => '[]',
                    'order'          => 2,
                    'display'        => 1,
                    'searchable'     => 0,
                    'show_column'    => 1,
                    self::OPTION_KEY => [
                        [
                            'title' => '是',
                            'value' => 1,
                            'order' => 1,
                        ],
                        [
                            'title' => '否',
                            'value' => 0,
                            'order' => 1,
                        ]
                    ]
                ],
                [
                    'title'          => '授权状态',
                    'field_name'     => 'auth_status',
                    'field_type'     => 'select',
                    'props'          => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                        'default_value'  => '1'
                    ],
                    'validate'       => '[]',
                    'order'          => 2,
                    'display'        => 1,
                    'searchable'     => 0,
                    'show_column'    => 1,
                    self::OPTION_KEY => [
                        [
                            'title' => '已授权',
                            'value' => 1,
                            'order' => 1,
                        ],
                        [
                            'title' => '未授权',
                            'value' => 0,
                            'order' => 1,
                        ]
                    ]
                ],
                [
                    'title'       => '授权时间',
                    'field_name'  => 'auth_time',
                    'field_type'  => 'datetime',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 1,
                    'show_column' => 1,
                ],
                [
                    'title'       => '微信授权方 appid',
                    'field_name'  => 'wx_authorizer_appid',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                        'default_value'  => ''
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 0,
                ],
                [
                    'title'       => '微信小程序名称',
                    'field_name'  => 'wx_nick_name',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 1,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                        'default_value'  => ''
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'          => '微信小程序认证类型',
                    'field_name'     => 'wx_verify_type_info_id',
                    'field_type'     => 'select',
                    'props'          => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                        'default_value'  => -1
                    ],
                    'validate'       => '[]',
                    'order'          => 2,
                    'display'        => 1,
                    'searchable'     => 0,
                    'show_column'    => 0,
                    self::OPTION_KEY => [
                        [
                            'title' => '已认证',
                            'value' => 0,
                            'order' => 1,
                        ],
                        [
                            'title' => '未认证',
                            'value' => -1,
                            'order' => 1,
                        ]
                    ]
                ],
                [
                    'title'       => '微信小程序主体名称',
                    'field_name'  => 'wx_principal_name',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                        'default_value'  => ''
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 0,
                ],
                [
                    'title'       => '微信账号帐号介绍',
                    'field_name'  => 'wx_signature',
                    'field_type'  => 'textarea',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 0,
                        'default_value'  => ''
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 0,
                ],
                [
                    'title'       => '项目添加者',
                    'field_name'  => 'add_user_name',
                    'field_type'  => 'text',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                        'default_value'  => ''
                    ],
                    'validate'    => [],
                    'order'       => 2,
                    'display'     => 1,
                    'searchable'  => 0,
                    'show_column' => 1,
                ],
                [
                    'title'       => '创建时间',
                    'field_name'  => 'created_at',
                    'field_type'  => 'datetime',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                    ],
                    'validate'    => [],
                    'order'       => 8,
                    'display'     => 1,
                    'searchable'  => 1,
                    'show_column' => 1,
                ],
                [
                    'title'       => '更新时间',
                    'field_name'  => 'updated_at',
                    'field_type'  => 'datetime',
                    'props'       => [
                        'display_edit'   => 0,
                        'display_create' => 0,
                        'editable'       => 0,
                        'resizable'      => 1,
                        'sortable'       => 0,
                        'disabled'       => 1,
                    ],
                    'validate'    => [],
                    'order'       => 9,
                    'display'     => 1,
                    'searchable'  => 1,
                    'show_column' => 1,
                ],
            ],
            self::FILTER_GROUP_KEY => [
                [
                    'title'      => '全部',
                    'can_edit'   => 0,
                    'is_system'  => 1,
                    'uid'        => -1,
                    'order'      => 1,
                    'created_at' => $this->_mTime,
                    'updated_at' => $this->_mTime,
                    'conditions' => [],
                ],
            ],
        ];
    }
}